<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Benchmark.Responders.HTMLish</title>
    <link rel="stylesheet" href="benchmark_style.css" type="text/css" />
    <script type="text/javascript" src="benchmark.js"></script>
    <link rel="stylesheet" href="sheet.css" type="text/css" />
    <link rel="stylesheet" href="tree.css" type="text/css" />
    <script type="text/javascript" src="prototype.js"></script>
    <script type="text/javascript" src="neodom.js"></script>
    <script type="text/javascript" src="sheet.js"></script>
    <link type="text/css" rel="stylesheet" href="highlight.css" />
    <script type="text/javascript" src="highlight.js"></script>
    <script type="text/javascript" src="lang_js.js"></script>
    <script type="text/javascript" src="benchmark_htmlish.js"></script>
  </head>
  <body>
    <h1>
      <a href="benchmark_htmlish.js" name="top">Benchmark.Responders.HTMLish</a>
      <em><var>HTMLish</var> responders suite for <a href="benchmark.html">Benchmark</a></em>
    </h1>

    <ul class="toc tree" id="toc">
      <li><a href="#version">Version</a></li>
      <li><a href="#synopsis">Synopsis</a></li>
      <li><a href="#examples">Examples</a></li>
      <li><a href="#description">Description</a></li>
      <li class="tree-collapsed"><a href="#options">Options</a>
        <ul>
          <li><a href="#option-title">title</a></li>
        </ul>
      </li>
      <li><a href="#dependencies">Dependencies</a></li>
      <li><a href="#bugs">Bugs</a></li>
      <li><a href="#see-also">See Also</a></li>
      <li><a href="#authors">Authors</a></li>
      <li><a href="#license">License</a></li>
      <li><a href="#disclaimer">Disclaimer</a></li>
    </ul>

    <div class="section">
      <h2><a name="version">Version</a></h2>
      <p id="version-revision"><a href="benchmark_htmlish.js">use the source, young padawan!</a></p>
    </div>

    <div class="section">
      <h2><a name="synopsis">Synopsis</a></h2>
<pre><code class="whjs">
new Benchmark(
  { // functions to be benchmarked ...
  },
  { // options ...
    responders: 'HTMLish',
    title:      'my funky benchmark',
    // ... more options ...
  }
);
</code></pre>
    </div>

    <div class="section">
      <h2><a name="examples">Examples</a></h2>
      <p>
        Run any <a href="benchmarker.html#examples">Benchmarker</a> example,
        using <var>HTMLish</var> responders suite.
        Output will look like the following:
      </p>
      <table id="sheet1175366220405" summary="benchmark results" class="tester sortable">
        <caption>
          array.length = 5
        </caption>
        <thead>
          <tr>
            <th class="name sortable sortable-Text">name</th>
            <th class="rate sortable sortable-Number">rate</th>
            <th class="worst sortable sortable-Number">worst</th>
            <th class="avg sortable sortable-Number">avg</th>
            <th class="best sortable sortable-Number">best</th>
            <th class="duration sortable sortable-Number">duration</th>
            <th class="iterations sortable sortable-Number">iterations</th>
          </tr>
        </thead>
        <tbody>
          <tr class="odd">
            <td style="border-right: 5px solid rgb(204, 0, 0);" class="name">t_each</td>
            <td class="rate">7087/s</td>
            <td class="worst">0.170ms</td>
            <td class="avg">0.141ms</td>
            <td class="best">0.130ms</td>
            <td class="duration">0.508s</td>
            <td class="iterations">3600</td>
          </tr>
          <tr class="even">
            <td style="border-right: 100px solid rgb(0, 204, 0);" class="name">t_for</td>
            <td class="rate">140400/s</td>
            <td class="worst">0.010ms</td>
            <td class="avg">0.007ms</td>
            <td class="best">0.000ms</td>
            <td class="duration">0.500s</td>
            <td class="iterations">70200</td>
          </tr>
        </tbody>
      </table>
      <table id="sheet1175366221853" summary="benchmark results" class="tester sortable">
        <caption>
          array.length = 10
        </caption>
        <thead>
          <tr>
            <th class="name sortable sortable-Text">name</th>
            <th class="rate sortable sortable-Number">rate</th>
            <th class="worst sortable sortable-Number">worst</th>
            <th class="avg sortable sortable-Number">avg</th>
            <th class="best sortable sortable-Number">best</th>
            <th class="duration sortable sortable-Number">duration</th>
            <th class="iterations sortable sortable-Number">iterations</th>
          </tr>
        </thead>
        <tbody>
          <tr class="odd">
            <td style="border-right: 3px solid rgb(204, 0, 0);" class="name">t_each</td>
            <td class="rate">3891/s</td>
            <td class="worst">0.260ms</td>
            <td class="avg">0.257ms</td>
            <td class="best">0.250ms</td>
            <td class="duration">0.514s</td>
            <td class="iterations">2000</td>
          </tr>
          <tr class="even">
            <td style="border-right: 100px solid rgb(0, 204, 0);" class="name">t_for</td>
            <td class="rate">117200/s</td>
            <td class="worst">0.020ms</td>
            <td class="avg">0.009ms</td>
            <td class="best">0.000ms</td>
            <td class="duration">0.500s</td>
            <td class="iterations">58600</td>
          </tr>
        </tbody>
      </table>
      <table id="sheet1175366223299" summary="benchmark results" class="tester sortable">
        <caption>
          array.length = 20
        </caption>
        <thead>
          <tr>
            <th class="name sortable sortable-Text">name</th>
            <th class="rate sortable sortable-Number">rate</th>
            <th class="worst sortable sortable-Number">worst</th>
            <th class="avg sortable sortable-Number">avg</th>
            <th class="best sortable sortable-Number">best</th>
            <th class="duration sortable sortable-Number">duration</th>
            <th class="iterations sortable sortable-Number">iterations</th>
          </tr>
        </thead>
        <tbody>
          <tr class="odd">
            <td style="border-right: 2px solid rgb(204, 0, 0);" class="name">t_each</td>
            <td class="rate">2060/s</td>
            <td class="worst">0.510ms</td>
            <td class="avg">0.485ms</td>
            <td class="best">0.480ms</td>
            <td class="duration">0.534s</td>
            <td class="iterations">1100</td>
          </tr>
          <tr class="even">
            <td style="border-right: 100px solid rgb(0, 204, 0);" class="name">t_for</td>
            <td class="rate">87400/s</td>
            <td class="worst">0.020ms</td>
            <td class="avg">0.011ms</td>
            <td class="best">0.010ms</td>
            <td class="duration">0.500s</td>
            <td class="iterations">43700</td>
          </tr>
        </tbody>
      </table>
      <p>These results were scraped from the "<a href="benchmark_t_loops.html">loops</a>" benchmark.</p>
    </div>

    <div class="section fixme">
      <h2><a name="description">Description</a></h2>
      <p>This one deserves some flamboyant description, doesn't it?!</p>
    </div>

    <div class="section">
      <h2><a name="options">Options</a></h2>
      <p>
        No option is compulsory, sensible defaults are already in place.
        The currently used options are:
      </p>
      <dl>
        <dt><a name="option-title">title</a>  <kbd>{String}</kbd> <samp>['results']</samp></dt>
        <dd>results <var>table</var>'s <var>caption</var></dd>
      </dl>
    </div>

    <div class="section">
      <h2><a name="dependencies">Dependencies</a></h2>
      <ul>
        <li><a href="http://www.prototypejs.org/">Prototype</a></li>
        <li><span class="fixme">neodom</span> (Prototype tweaks)</li>
        <li>optional: <a href="http://script.aculo.us/">script.aculo.us</a> (effects.js)</li>
        <li>optional: <span class="fixme">Sheet</span> (results table enhancements)</li>
      </ul>
    </div>

    <div class="section">
      <h2><a name="bugs">Bugs and Limitations</a></h2>
      <p>No bugs have been reported.</p>
    </div>

    <div class="section">
      <h2><a name="see-also">See Also</a></h2>
      <ul>
        <li><a href="benchmark.html">Benchmark</a></li>
        <li><a href="benchmarker.html">Benchmarker</a></li>
        <li><a href="benchmark_perlish.html">Benchmark.Responders.Perlish</a></li>
      </ul>
    </div>

    <div class="section">
      <h2><a name="authors">Authors</a></h2>
      <p>
        <a href="http://www.altblue.com/">Marius Feraru</a>,
        &lt;<a href="mailto:altblue@n0i.net">altblue@n0i.net</a>&gt;.
      </p>
    </div>

    <div class="section">
      <h2><a name="license">License and Copyright</a></h2>
      <p>
        &copy; 2006-2007 Marius Feraru &lt;altblue@n0i.net&gt;.
        All rights reserved.
      </p>
      <p>
        This module is free software; you can redistribute it
        and/or modify it under the same terms as Perl itself.
      </p>
    </div>

    <div class="section">
      <h2><a name="disclaimer">Disclaimer of Warranty</a></h2>
      <p>
        Because this software is licensed free of charge, there is no warranty
        for the software, to the extent permitted by applicable law. Except when
        otherwise stated in writing the copyright holders and/or other parties
        provide the software "as is" without warranty of any kind, either
        expressed or implied, including, but not limited to, the implied
        warranties of merchantability and fitness for a particular purpose.
        The entire risk as to the quality and performance of the software is
        with you. should the software prove defective, you assume the cost
        of all necessary servicing, repair, or correction.
      </p>
      <p>
        In no event unless required by applicable law or agreed to in writing
        will any copyright holder, or any other party who may modify and/or
        redistribute the software as permitted by the above license, be liable
        to you for damages, including any general, special, incidental,
        or consequential damages arising out of the use or inability to use
        the software (including but not limited to loss of data or data being
        rendered inaccurate or losses sustained by you or third parties or a
        failure of the software to operate with any other software), even if
        such holder or other party has been advised of the possibility of such
        damages.
      </p>
    </div>

    <script type="text/javascript">
      var hl = new Highlighter(false); hl.init();
      new Tree($('toc'));
      document.getElementById('version-revision').innerHTML = Benchmark.Responders.HTMLish.toString();
    </script>
  </body>
</html>
